class TimerManager {
  int _expirationTime = 5000;//30 * 60 * 1000;  /// 过期时间为3分钟

  TimerManager._();

  static TimerManager _instance = TimerManager._();

  factory TimerManager() => _instance;

  DateTime _time;

  set lastTime(DateTime time) => _time = time;

  bool isExpired() {
    DateTime now = DateTime.now();
    return now.difference(_time).inMilliseconds > _expirationTime;
  }

}